﻿using ROSBridgeLib;
using ROSBridgeLib.sensor_msgs;
using ROSBridgeLib.std_msgs;
using ROSBridgeLib.geometry_msgs;
using ROSBridgeLib.nav_msgs;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using SimpleJSON;
using CnControls;

public class CmdVelPublisher : BasePublisher {

    void Start()
    {

        topic="cmd_vel";

        messageType= "geometry_msgs/Twist";

    }  




   
    public TwistMsg PackageMsg (Vector2 inputVector)
    {


        TwistMsg msg = new TwistMsg (new Vector3Msg(inputVector.y*0.25,0.0, 0.0), new Vector3Msg(0.0, 0.0, -inputVector.x*0.4));

        return msg;


    }


}
